import time
import  threading
def sing():
    while True:
        print("我在唱歌")
        time.sleep(1)

def dancing():
    while True:
        print("我在跳舞")
        time.sleep(1)
#创建唱歌的线程
sing_thread=threading.Thread(target=sing)
#创建跳舞的线程
dancing_thread=threading.Thread(target=dancing)
#调用跳舞线程
sing_thread.start()
#调用跳舞线程
dancing_thread.start()